﻿<%@ Page Language="C#" MasterPageFile="~/Main.Master" AutoEventWireup="true" CodeBehind="Clients.aspx.cs"
    Inherits="ETestIT.UI.Clients" Title="Untitled Page" %>
<%@ Register TagPrefix="uc" TagName="ClientAddEdit" Src="~/AppControls/ClientAddEdit.ascx" %>
<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <h2 id="PageTitle"><%= Title %></h2>
    <asp:LinkButton 
    ID = "createNewClient" 
    Text = "add new" 
    runat = "server" 
    OnCommand = "GridCommand"
    CommandName = "ClientNew"
    CommandArgument='0'
    CssClass="linkButton ui-state-default ui-corner-all"/>
    <br/><br/>
    <div>
        <asp:GridView ID="gvClients" runat="server" AutoGenerateColumns="False" CssClass="easygrid" >
            <columns>
                <asp:TemplateField HeaderText ="Name">
                    <ItemTemplate>
                        <asp:Label 
                        ID="lblName" 
                        runat="server" 
                        Text='<%# Eval("Name") %>'/>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText ="Contact Information">
                    <ItemTemplate>
                        <asp:Label 
                        ID="lblContactInformation" 
                        runat="server" 
                        Text='<%# Eval("ContactInformation") %>'/>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText ="Type Of Client">
                    <ItemTemplate>
                        <asp:Label 
                        ID="lblTypeOfClient" 
                        runat="server" 
                        Text='<%# Eval("TypeOfClient") %>'/>
                    </ItemTemplate>
                </asp:TemplateField>
                  
                  <asp:TemplateField HeaderText = "Actions">
                    <ItemTemplate>
                        <asp:LinkButton 
                                ID="lbtnEditClient" 
                                runat="server" 
                                Text="Edit"
                                CommandName="ClientEdit" 
                                CommandArgument='<%#Eval("Id")%>' 
                                OnCommand= "GridCommand"
                                CssClass="linkButton ui-state-default ui-corner-all"/>
                        <asp:LinkButton 
                                ID="lbtnDeleteClient" 
                                runat="server" 
                                Text="Delete"
                                CommandName="ClientDelete" 
                                CommandArgument='<%#Eval("Id")%>' 
                                OnCommand="GridCommand"
                                CssClass="linkButton ui-state-default ui-corner-all"/>
                    </ItemTemplate>
                </asp:TemplateField>
            </columns>
          </asp:GridView>
          <br/>
        <div>
        <uc:ClientAddEdit runat="server" Id= "clientAddEdit" Visible="false" />
        </div>
    </div>
</asp:Content>


